
'''类似于try'''

def demo1():
    # try:
    #     pass
    # except Exception as e:
    #     pass
    # finally:
    #     pass
    with open(r'1', 'r') as f:
        f.read()
        f.close()

    with open(r'1', 'w') as f:
        f.write("abc")
        f.close()